#include "database.h"
#include "loginwindow.h"
#include "registerwindow.h"
#include "chatroom.h"

#include <QApplication>
#include <QStackedWidget>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    Database::getInstance()->initDatabase();

    QStackedWidget stackedWidget;
    stackedWidget.setFixedSize(400, 300);

    LoginWindow *l = new LoginWindow(&stackedWidget);
    RegisterWindow *r = new RegisterWindow(&stackedWidget);
    ChatRoom *c = new ChatRoom(&stackedWidget);

    stackedWidget.addWidget(l);
    stackedWidget.addWidget(r);
    stackedWidget.addWidget(c);

    stackedWidget.show();
    return a.exec();
}
